<template>
	<view class="box">
		<view class="top hidden bg_ff6a00">
			<view class="top_content flex7">
				<image src="../../static/image/index/y@2x.png"></image>
				<view class="font_35 color_fff text_bold">支付成功</view>
			</view>
			<view class="top_btn_wrapper flex4">
				<view class="font_31 color_fff flex7" @click="get_index()">返回首页</view>
				<view class="font_31 color_fff flex7" @click="get_detail()">订单详情</view>
			</view>
		</view>
		<view class="content hidden content-box" v-if="detail_info">
      <view class="flex-lect zx-dd">
      	<view class="label">寄存日期：</view>
      	<view class="w_flex1">{{detail_info.start_time}}~{{detail_info.end_time}}</view>
      </view>
      <view class="flex-lect zx-dd">
        <view class="lab">下单时间：</view>
        <view class="w">{{detail_info.createtime_text}}</view>
      </view>
      <navigator :url="'/pages/index/order?id='+detail_info.store.id+'&tuik=1'+'&order='+detail_info.id" class="flex-lect zx-dd" style="justify-content: space-between;">
        <view class="lab">修改</view>
        <image src="../../static/image/index/ri.png" class="jt"></image>
      </navigator>
      
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: '',
				notice_text: '',
        detail_info:null
			}
		},
		onLoad(e) {
			this.id = e.id;
      this.getOrdersDetail()
			this.notice_text = JSON.parse(uni.getStorageSync('notice_text')).replace(/<img/g, '<img class="fwb_img"');
		},
		methods: {
      getOrdersDetail() {
      	let that = this;
      	this.$http.get(this.$api.getMyOrdersDetail, {
      		order_id: this.id,
      		'scene':true,
      	}).then(res => {
      		
      		this.detail_info = res.data;
      		
      		
      	})
      
      },
			get_index() {
				// 返回首页
				uni.reLaunch({
					url: '/pages/index/index'
				});
			},
			get_detail() {
				let id_ = this.id;
				uni.redirectTo({
					url: '/pages/user/detail?id=' + id_
				});
			}
		}
	}
</script>

<style lang="less">
  .zx-dd{
    padding: 20rpx 0; border-bottom: 1px solid #ddd; 
    &:last-child{border-bottom: none;}
    view{font-size: 28rpx;}
  }
  .jt{width: 30rpx; height: 30rpx;}
  .content-box{padding: 20rpx; background-color: #fff; margin-top: 30rpx; border-radius: 10rpx;}
  .box{background-color: #f5f5f5;}
	.top {
		border-radius: 0 0 10rpx 10rpx;

		.top_content {
			margin: 96rpx 0 135rpx;

			image {
				width: 42rpx;
				height: 42rpx;
				margin-right: 12rpx;
			}
		}

		.top_btn_wrapper {
			margin-bottom: 77rpx;

			view {
				width: 285rpx;
				height: 77rpx;
				border-radius: 48rpx;
				border: 1px solid #fff;
			}
		}
	}

	.title {
		view {
			&:first-child {
				font-size: 50rpx;
				line-height: 71rpx;
			}
		}

		.line {
			width: 127rpx;
			height: 12rpx;
			border-radius: 10rpx;
			margin: -22rpx auto 0;
			background: linear-gradient(90deg, #FF6A00 0%, #EE8332 46%, rgba(238, 131, 50, 0.26) 83%, rgba(252, 252, 252, 0.07) 100%);
		}
	}

	.wrapper {
		padding: 0;
	}

	.success_m1 {
		margin: 10rpx 0 52rpx;
	}

	.success_m2 {
		margin: 0 29rpx 0 0;
	}

	.success_m3 {
		margin: 0 0 23rpx 0;
	}

	.content {
		// padding: 40rpx;
	}
</style>
